<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Nintendorks Chatter</title>
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style type="text/css" media="screen">@import "/iui/iui.css";</style>
<!--
<script type="application/x-javascript" src="/iui/iui.js"></script>
-->
<!--
<script type="application/x-javascript" src="http://10.0.1.2:1840/ibug.js"></script>
-->
</head>

<body onload="scrollTo(0,1)">
    <div class="toolbar">
        <h1 id="pageTitle">{{forumTitle}}</h1>
        <a id="backButton" class="button" href="/index">Index</a>
        {% ifnotequal forumID "newposts" %}
        <a class="button" href="/post?mode=post&f={{forumID}}">New</a>
        {% endifnotequal %}
    </div>

    <ul id="forum" title="{{forumTitle}}" selected="true">
   	<li class="plain"><div align="center">
	{% ifnotequal prevStart "" %}
	<a class="smallRoundButton" href="/forum?f={{forumID}}&start={{prevStart}}">&#9668;</a>
	{% else %}
	<div class="smallClearButton"> </div>
	{% endifnotequal %}

	<div class="smallRoundButton" onclick="scrollTo(0, 999999)">&#9660;</div>

	{% ifnotequal nextStart "" %}
	<a class="smallRoundButton" href="/forum?f={{forumID}}&start={{nextStart}}">&#9658;</a>
	{% else %}
	<div class="smallClearButton"> </div>
	{% endifnotequal %}
	</div></li>
	
    	{% if retrievalError %}
    		<li>
    			<span style="{ color: #FF0000; font-size: 16px; text-align: center; }">
    			Retrieval error! Try refreshing!</span>
    		</li>
    	{% else %}
	        {% for thread in threads %}
	            <li class="thread">
	            <table border="0" cellpadding="0" cellspacing="0" border="0">
	                <tr>
	                <td width="100%">
	                    <a class="thread" href="/thread?id={{thread.id}}&forumID={{forumID}}&numReplies={{thread.numReplies}}">{{thread.title}}
	                    <br /><span class="threadSubtitle">
	                    {% ifequal thread.unread "true" %}
	                    <img src="/images/icon_minipost_new.gif"></img>
	                    {% endifequal %}
	                    {{thread.lastPostTime}} - {{thread.numReplies}} replies
	                    </span></a>
	                </td>
	                <td>
	                	{% ifequal thread.unread "true" %}
	                    <a class="threadLastPage" href="/thread?id={{thread.id}}&forumID={{forumID}}&numReplies={{thread.numReplies}}&unread=true#unread"></a>
	                    {% else %}
	                    <a class="threadLastPage" href="/thread?id={{thread.id}}&forumID={{forumID}}&start={{thread.lastStart}}&numReplies={{thread.numReplies}}&bottom=true"></a>
	                    {% endifequal %}
	                </td>
	                </tr>
	            </table>
	            </li>
	        {% endfor %}
	   	{% endif %}
        
   	<li class="plain"><div align="center">
	{% ifnotequal prevStart "" %}
	<a class="smallRoundButton" href="/forum?f={{forumID}}&start={{prevStart}}">&#9668;</a>
	{% else %}
	<div class="smallClearButton"> </div>
	{% endifnotequal %}

	<div class="smallRoundButton" onclick="scrollTo(0, 1)">&#9650;</div>

	{% ifnotequal nextStart "" %}
	<a class="smallRoundButton" href="/forum?f={{forumID}}&start={{nextStart}}">&#9658;</a>
	{% else %}
	<div class="smallClearButton"> </div>
	{% endifnotequal %}
	</div></li>
	<li class="threadTitle">
	<div style="font-size: 13px; font-weight: normal;" align="center">
	<form method="get" name="jumpbox" action="./forum" onsubmit="if(document.jumpbox.f.value == -1){return false;}" style="margin: -3px 0 -4px 0;">	
	<select onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }" name="f">	
		<option value="-1">Select a forum</option>
		<option value="newposts">New Posts</option>
		<option value="1">General Blabbery</option>
		<option value="2">Entertaining Entertainment</option>
		<option value="3">Games Galore</option>
		<option value="4">Nerdvana</option>
		<option value="6">Nintendorks, Assemble!</option>
		<option value="7">The Marching Banned</option>
		<option value="8">The Dumping Ground</option>		
	</select>
	</form>
	</div>
	</li>
    </ul>
    
    {% include "googleanalytics.html" %}
    </body>
</html>